<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<p><img src="1.jpg" width="100px"></p>
	<p><img src="2.jpg" width="100px"></p>
	<p><img src="3.jpg" width="100px"></p>
</body>
<script type="text/javascript">
	objs=document.images;
	for(i=0;i<objs.length;i++){
		objs[i].style.background='red';
	}
</script>
</html>